package ooday05;

/** 枚举的演示*/
public class EnumDemo {
    public static void main(String[] args) {
        Season s = Season.SUMMER;
        System.out.println(s);
        switch (s){
            case SPRING:
            case SUMMER:
            case AUTUMN:
            case WINTER:
                System.out.println(s.getSeasonName()+","+s.getSeasonDesc());
                break;
        }

        Season winter = Season.valueOf("WINTER");
        System.out.println(winter.getSeasonName());
        for (Season value : Season.values()) {
            System.out.println(value.getSeasonName()+","+value.getSeasonDesc());
        }

    }
}
